from django.db import models
from shop_admin.models import MyUser


class Addresses(models.Model):
    address = models.CharField(max_length=128,verbose_name="地址")
    users = models.ForeignKey(MyUser,on_delete=models.CASCADE,null=True)
    is_defult = models.BooleanField(default=False,null=True)


class Orders(models.Model):
    order_sn = models.CharField(max_length=100,unique=True)
    price = models.FloatField(null=True)
    user_id = models.ForeignKey(MyUser,on_delete=models.CASCADE,null=True)
    pay_type = models.IntegerField(default=2)
    status = models.IntegerField(default=0)
    address = models.CharField(max_length=200)
    code = models.CharField(max_length=100,default='')
